package cn.wlinker.video.monitor.domain.vo;

import cn.wlinker.video.monitor.domain.dto.MonitorDeviceDTO;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

@lombok.Data
public class VideoVO implements Serializable {
    @ApiModelProperty(value = "监控名称")
    private String name;
    @ApiModelProperty(value = "播放url")
    private String playUrl;
    @ApiModelProperty(value = "播放窗口")
    private Integer gird;
    @ApiModelProperty(value = "过期时间")
    private Date expireTime;
    @ApiModelProperty(value = "设备id")
    private String id;
    //表示设备所属部门的父类部门
    private String firstId;

    public static VideoVO build(MonitorDeviceDTO dto, String playUrl){
        VideoVO videoVO = new VideoVO();
        videoVO.setId(dto.getId());
        videoVO.setName(dto.getName());
        videoVO.setPlayUrl(playUrl);
        return videoVO;
    }
}
